<div style='clear:both;'></div>
<div style='float:left;'>
	<h2>Let the Nominations Begin!</h2>
</div>
<div style='clear:both;'></div>
<form name='nominationfrm' id='nominationfrm' class='funcSubmitNomination' action='<?php echo HTTP_SERVER; ?>nominate#result' method='post'>
	<?php
		if(isset($_GET['blog']) && trim($_GET['blog'])!="" && isset($_GET['category']))
			echo "<b>Note: </b><span class='success'>".$_GET['blog']."</span> has been prefilled into it's chosen categories. If you can think of other blogs you'd like to nominate please do so, otherwise just <a href='#result'>skip to the bottom</a> to submit your nomination. Thank you.";
	?>
	<input type='hidden' name='nominateme' id='nominateme' value='<?php echo $nominateme; ?>' />
	<div style='clear:both;'></div>
	<?php 
		$count=1;
		if($db->Query("SELECT * FROM category;")) {
			while($db->getRow()) {
				//alternate postition of each category box
				if($count%2) { $side = "left"; $otherside = "right"; }
				else { $side = "right"; $otherside = "left"; }
				echo "<div class='".$side." box' style='border-".$otherside.":1px solid #ddd;border-bottom:1px solid #ddd;border-top:1px solid #ddd;'>
								<h2 class='header'>".$db->access['name']."</h2>
								<div class='contentBody'><p>".$db->access['description']."</p>
									<span style='float:left;padding:40px;'><img src='".HTTP_SERVER.IMG_DIR."icons/".$db->access['id'].".jpg' alt='' /></span>
									<b>I Nominate: </b><ul>";
											for($i=0; $i<$db->access['count'];$i++) {
												echo "<li style='background:#fff;'>http://<input type='text' name='url_".$db->access['id']."_".$i."' id='url_".$db->access['id']."_".$i."' class='validate-url' size='30' value='".$urls[$db->access['id']."_".$i]."' /></li>";
											}
							echo "</ul>
								</div>
							</div>";
				$count++;
			}
		}
	?>
	<div class="center box">
		<h2 class="header">Submit your Nominations</h2>
		<div class='contentBody'>
			<a href='#' name='result' id='result'></a>
			<div id='results-flash'><?php if($flash!="") echo $flash; ?></div>
			<?php if(!$clearform) { ?>
			<div id='results'>
				<p>Please type your email address and the verification code and you will be sent an email to confirm your nomination.</p>
				<label for='email'><b>Your Email Address: </b></label> <span id="inf_email">*</span><br />
				<input type='text' name="email" id="email" class='required validate-email' size="50" value='<?php echo $post_email; ?>' />
				<p class='left'>
					<label for='validate'><b>Security Code: </b></label> <span id="inf_validate">*</span><br />
					<span class='spinner'><img src="<?php echo HTTP_SERVER.INCLUDE_DIR; ?>captcha.php?<?php echo $id; ?>" alt="" /></span>
					<input class='required security-code' type="text" name="validate" id="validate" value="<?php echo $code; ?>" size="5" maxlength="5" />
					<input type='hidden' name="id" value="<?php echo $id; ?>">
				</p>
				<p style='float:left;padding:13px;'>
					<input type='submit' name='submit' id='submit' class='bigbutton left' value='Submit' />
					&nbsp;<span id='nominate-loading' class='hideme spinner'> </span>
				</p>
			</div>
			<?php } ?>
		</div>
	</div>
</form>